home *** CD-ROM | disk | FTP | other *** search
/ El Mac 9 / El Mac 9.iso / Shareware / Applications / Charting Coach v1.5 / Charting Coach v1.dxr / 00515.ls < prev    next >
Encoding:
Text File  |  1996-04-08  |  709 b   |  32 lines

  1. on lookForPeak
  2.   global stamp, mucus
  3.   set PossiblePeak to 0
  4.   set last to count(stamp) - 1
  5.   repeat with i = 1 to last
  6.     if (getAt(mucus, i) < 7) and (getAt(mucus, i) > 1) then
  7.       if not ((getAt(mucus, i + 1) < 7) and (getAt(mucus, i + 1) > 1)) then
  8.         if getOne(stamp, 10) <> 0 then
  9.           setAt(stamp, getOne(stamp, 10), 3)
  10.         end if
  11.         set PossiblePeak to i
  12.       end if
  13.     end if
  14.   end repeat
  15.   return PossiblePeak
  16. end
  17.  
  18. on ToNowMax F, L, CheckList, max
  19.   if F < 1 then
  20.     set F to 1
  21.   end if
  22.   if L > count(CheckList) then
  23.     set L to count(CheckList)
  24.   end if
  25.   repeat with i = F to L
  26.     if getAt(CheckList, i) > max then
  27.       return 0
  28.     end if
  29.   end repeat
  30.   return 1
  31. end
  32.